﻿using LimaLims.Application.Service.Base.Dto;
using LimaLims.Core;
using LimaLims.Core.Enum;
using LimaLims.Core.Util;

namespace LimaLims.Application.Service.TestCenter.Dto
{
    /// <summary>
    /// 工频耐压试验
    /// </summary>
    public class PfwvTestOutput : BaseDto
    {
        /// <summary>
        /// 出厂编号
        /// </summary>
        public string FactoryNumbe { get; set; }
        /// <summary>
        /// 设备Id
        /// </summary>
        public long EquipmentInfoId { get; set; }
        /// <summary>
        /// 设备编号
        /// </summary>
        public string EquipmentCode { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string EquipmentName { get; set; }

        /// <summary>
        /// 试验任务ID
        /// </summary>
        public long? ExperimentTaskId { get; set; }

        /// <summary>
        /// 试验任务编号
        /// </summary>
        public string ExperimentTaskCode { get; set; }
        /// <summary>
        /// 环境温度
        /// </summary>
        public float? AmbientTemperature { get; set; }

        /// <summary>
        /// 环境湿度
        /// </summary>
        public float? AmbientHumidity { get; set; }

        /// <summary>
        /// 大气压力
        /// </summary>
        public float? AtmosphericPressure { get; set; }

        /// <summary>
        /// 加压部位
        /// </summary>
        public string PressurizedPart { get; set; }

        /// <summary>
        /// 试验电压
        /// </summary>
        public float? TestVoltage { get; set; }

        /// <summary>
        /// 试验时间
        /// </summary>
        public int? TestTime { get; set; }

        /// <summary>
        /// 试验结果
        /// </summary>
        public ExperimentResult? Result { get; set; }

        /// <summary>
        /// 试验结果Text
        /// </summary>
        public string ResultText => Result.HasValue ? Result.GetDescription() : "";
    }


    /// <summary>
    /// 工频耐压试验分页查询
    /// </summary>
    public class PfwvTestPageInput : PageInputBase
    {
        /// <summary>
        /// 任务编号
        /// </summary>
        public string ExperimentTaskCode { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        public string EquipmentCode { get; set; }

        /// <summary>
        /// 出厂编号
        /// </summary>
        public string FactoryNumbe { get; set; }
    }
}
